package com.visionet.school.app.web.service.file;

import com.visionet.school.app.web.common.utils.PageUtils;
import com.visionet.school.app.web.entity.file.FileClass;
import com.visionet.school.app.web.entity.file.vo.FileVo;
import com.visionet.school.app.web.repository.file.FileClassRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * Created by hxpeng on 2017/3/29.
 */

@Service
public class FileClassService {

    private static final Logger logger = LoggerFactory.getLogger(FileClassService.class);

    @Resource
    private FileClassRepository fileClassRepository;

    public FileClass save(FileClass fileClass){return fileClassRepository.save(fileClass);}

    public Map<String, Object> queryStudentsPhoto(FileVo fileVo){
        Page<FileVo> objPage = fileClassRepository.queryClassPhoto(fileVo);
        return PageUtils.getPageMap(objPage);
    }
}
